/*
 * @Author: lee
 * @Date: 2024-01-10 13:57:51
 * @LastEditors: lee
 * @LastEditTime: 2024-01-10 16:28:09
 * @Description: file content
 */
import { defineComponent, ref } from "vue";

export default defineComponent({
    props: ['msg'],
    setup(props, { slots }) {
        return () => (
            <div>
                <p>子组件</p>
                <p>{props.msg}</p>
                {/* 默认插槽 */}
                <>
                    <p>{slots.default ? slots.default() : 'foo'}</p>
                    <p>{slots.bar?.()}</p>
                </>
            </div>
        );
    },
})